package com.lb.design.pattern.strategypattern;

import com.lb.design.pattern.strategypattern.context.Context;
import com.lb.design.pattern.strategypattern.impl.BackDoorImpl;
import com.lb.design.pattern.strategypattern.impl.BlockEnemyImpl;
import com.lb.design.pattern.strategypattern.impl.GivenGreenLightImpl;

/**
 * Created with IntelliJ IDEA.
 * Description: 使出三个锦囊妙计
 * User: liubin
 * Date: 2017-12-29
 * Time: 下午 2:17
 */
public class Test {

    public static void main(String[] args) {
        Context context;
        System.out.println("第1个==============》");
        context = new Context(new BackDoorImpl());
        context.operoate();
        System.out.println("第一个==============结束");
        System.out.println("第2个==============》");
        context = new Context(new GivenGreenLightImpl());
        context.operoate();
        System.out.println("第二个==============结束");
        System.out.println("第3个==============》");
        context = new Context(new BlockEnemyImpl());
        context.operoate();
        System.out.println("第三个==============结束");
    }
}
